package com.qhit.service.impl;

import com.qhit.mapper.UserMapper;
import com.qhit.pojo.User;
import com.qhit.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;


    public List<User> getList(HashMap hashMap) {
        return userMapper.getList(hashMap);
    }

    public int getListCount(HashMap hashMap) {
        return userMapper.getListCount(hashMap);
    }

    public int add(User user) {
        return userMapper.add(user);
    }

    public User getUserById(int id) {
        return userMapper.getUserById(id);
    }

    public int edit(User g) {
        return userMapper.edit(g);
    }

    public int del(int id) {
        return userMapper.del(id);
    }

    public User getUserByName(String username) {
        return userMapper.getUserByName(username);
    }
}
